package com.whzykj.common;

import java.util.Map;
import java.util.ResourceBundle;

import com.google.common.collect.Maps;
import com.jfinal.kit.Prop;
import com.jfinal.kit.PropKit;

/**
 * 服务常量
 * @author 
 *
 */
public class ServiceConstants {
	private static Prop p = PropKit.use("config.properties");
	private static Map<String,String> map = Maps.newHashMap();
	public static String namespace = p.get("namespace");	
	public static int  token_timeout = Integer.parseInt(p.get("token.timeout"));
	
	static{
		String[] space = namespace.split(",");
		for (int i = 0; i < space.length; i++) {
			map.put(space[i].split(":")[0], space[i].split(":")[1]);
		}
	}
	
	public static String getNameSpace(String namespace){
		return map.get(namespace);
	}

}
